package com.xeem.core.components
{

	import flash.display.Loader;
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.net.URLRequest;
	import com.xeem.fl.components.*;

	
	public class BaseComponent extends MovieClip
	{
		//状态字管理
		private var _status:String;
		
		//组件大小
		private var _box:MBox;
		
		//数据存储
		private var _data:*;
		
		//序列名称
		private var _serialName:String;
		
		public function loadSource($url:String,$box:MBox=null){
			var my_Loader:Loader= new Loader();			
			my_Loader.load(new URLRequest($url));
			if ($box!=null){
				 this._box=$box;
				 this.addEventListener(Event.COMPLETE,setForce);				
			}
			addChild(my_Loader);
			trace (this.height);
		}
		
		public function setForce(e:Event){
			//this.x=this._box.X;
			//this.y=this._box.Y;
			trace (this.height);
		}
		
		public function get Box(){
			return this._box;
		} 
		
		public function set Box(val:MBox){
			this._box=val;
		}
			
		public function get Status(){
			return this._status;
		}
		
		public function set Status(val:String){
			this._status=val;
		}
		
		public function get serialName(){
			return this._serialName;
		}
		
		public function set serialName(val:String){
			this._serialName=val;
		}
	}
}